home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / doc / libmake.doc < prev    next >
Text File  |  1994-02-13  |  4KB  |  137 lines

  1.  
  2. libmake/libmake                         libmake/libmake
  3.  
  4.                 LIBMAKE.DOC
  5.  
  6.               GENERATING LARGE LINK LIBRARIES
  7.  
  8.     Libmake is a utility that will scan a file listings sources files for
  9.     a library, determine what is out of date, compile the out of date
  10.     modules (compile .c modules, assemble .a modules), and JOIN the whole
  11.     thing together in the end to create a library.  Libmake is useful
  12.     for creating large libraries that would otherwise overflow the command
  13.     line length limit in DMakefile.
  14.  
  15.     Libmake takes several arguments, some optional:
  16.  
  17.     libmake <file> -n -o objdir -l lib -clean -pr -mRR -mC -mD -proto -Ddef
  18.  
  19.  
  20.     <file>
  21.     specify the control file that contains a list of source modules,
  22.     see below.
  23.  
  24.     -v
  25.     verbose operation
  26.  
  27.     -n
  28.     dry run (do not actually compile/assemble/join anything)
  29.  
  30.     -Dmacro[=def]
  31.  
  32.     specify DCPP macro, i.e. #define equivalent to be passed to all
  33.     compiles.
  34.  
  35.     -o object_dir
  36.  
  37.     specify object directory prefix, if a directory must end in
  38.     '/' or ':', allowing both file prefixes and directory paths.
  39.  
  40.     -l library
  41.  
  42.     specify library output file, usually something.lib
  43.  
  44.     -clean
  45.  
  46.     instead of compiling/assembling/join'ing the library, delete
  47.     ALL object modules from object_dir relating to the library.
  48.  
  49.     -pr
  50.     pass -pr option to DCC
  51.  
  52.     -proto
  53.     pass -proto option to DCC
  54.  
  55.     -mr
  56.     -mR
  57.     -mRR
  58.     specify reg-call opts to DCC (normally only -mRR is useful when
  59.     generating fully registered libraries)
  60.  
  61.     -mD
  62.     pass -mD to DCC, causes DCC to use the large-data
  63.     model.    Default is to use the small-data model
  64.  
  65.     -mC
  66.     pass -mC to DCC, causes DCC to use the large-code
  67.     model.    Default is to use the small-data model
  68.  
  69.     -prof
  70.     pass -prof to DCC, causes profiling code to be generated for
  71.     all the routines in the library.
  72.  
  73.  
  74. CONTROL FILE
  75.  
  76.     The control file is named files.<something> by convention, for
  77.     example, 'files.c3lib', which happens to be the control file used
  78.     generate C*.LIB.
  79.  
  80.     A control file may contain blank lines, lines that begin with a
  81.     semi-colon (comments), and lines containing a file name optionally
  82.     preceeded by a '*'.  Here is an example:
  83.  
  84.  
  85.     ------------------ example file -----------------
  86.  
  87.     ;    Full C library
  88.  
  89.     assert/assert.c
  90.     assert/abort.c
  91.     amiga/exit.c
  92.     amiga/main.c
  93.     amiga/wbmain.c
  94.     *amiga/c.a
  95.     *amiga/c_pi.a
  96.     *amiga/c_pr.a
  97.     *amiga/x.a
  98.     amiga/config.a
  99.  
  100.     ------------------ example file -----------------
  101.  
  102.     Lines beginning with a '*' tell LIBMAKE to compile/assemble the file
  103.     but NOT to include the object module in the generated output library.
  104.  
  105.     Thus, in the above example amiga/c.a would be assembled but not made
  106.     part of the DLIB:C.LIB
  107.  
  108.     Also note that the path specified for a given file is appended to
  109.     the -o (object directory) specification.  Thus, if you were to use
  110.     the following libmake line:
  111.  
  112.     1> libmake files.c3lib -o dtmp:xx/ -l dlib:xx.lib -pr -proto
  113.  
  114.     Then object modules would be created as follows:
  115.  
  116.     DTMP:XX/assert/assert.o
  117.     DTMP:XX/assert/abort.o
  118.     DTMP:XX/amiga/exit.o
  119.  
  120.     etc..
  121.  
  122.     You probably want to pre-create the directory structure required.
  123.     Please refer to the library source archive for examples (no less than
  124.     DMakefile's calling libmake to regenerate every single DICE library
  125.     that exists!)
  126.  
  127.              NAMING CONVENSIONS IN THE CONTROL FILE
  128.  
  129.     .a        assemble with DAS
  130.     .a68    assemble with A68K
  131.     .o        insert specified object into destination library (raw copy)
  132.     .lib    insert specified library into destination library (raw copy)
  133.     <other> any other suffix is assumed to be a C source file to compile
  134.         with DCC
  135.  
  136.  
  137.